package com.shop.admin.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.shop.Result.LdbzResult;
import com.shop.admin.service.AdminCategoryService;
import com.shop.api.feign.CategorySercvie;
import com.shop.pojo.LdbzCategory;
import io.seata.spring.annotation.GlobalTransactional;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

@GlobalTransactional
public class AdminCategoryServiceImpl implements AdminCategoryService {

    private static final Logger logger = LoggerFactory.getLogger(AdminCategoryServiceImpl.class);

    @Autowired
    private CategorySercvie categorySercvie;
    @Override
    public LdbzResult countCategory(LdbzCategory entity) {
        return null;
    }

    @Override
    public LdbzResult selectByKey(long id) {
        return categorySercvie.selectByKey(id);
    }

    @Override
    public LdbzResult editCategory(long id) {
        return categorySercvie.selectByKey(id);
    }

    @Override
    public LdbzResult getCategoryList(LdbzCategory entity) {
        return categorySercvie.getCategoryList(entity);
    }

    @Override
    public LdbzResult getCategoryPage(LdbzCategory entity, int page, int limit) {
        return categorySercvie.getCategoryPage(entity, page, limit);
    }

    @Override
    public LdbzResult deleteByKey(String id) {
        return categorySercvie.deleteByKey(id);
    }

    @Override
    public LdbzResult insertByEntity(LdbzCategory entity) {
        return categorySercvie.insertByEntity(entity);
    }

    @Override
    public LdbzResult updateByKey(LdbzCategory entity) {
        return categorySercvie.updateByKey(entity);
    }

    @Override
    public LdbzResult getCategoryTree(long fid) {
        return categorySercvie.getCategoryTree(fid);
    }

    @Override
    public LdbzResult updateSort(String ids) {
        return categorySercvie.updateSort(ids);
    }
}
